class Person {
  constructor(name, age) {
    this.name = name;
    this.age = age;
  }

  getName() {
    return this.name;
  }
  getAge() {
    return this.age;
  }
}

const xiaoming = new Person('xiaoming', '66');
console.log(xiaoming.getName());
console.log(xiaoming?.idNum);
